home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 4,401 to 4,500 / aol-file-protocol-4400-4401-to-4500.zip / AOLDLs / PDA-Newton Development / ND Newt Development Environm / newt-devenv-31.sit / change31.txt < prev    next >
Text File  |  1995-08-11  |  19KB  |  405 lines

  1. change31.txt
  2. 8/11/95
  3. S. Weyer
  4.  
  5. Newt 3.1(N) & NewtPack 3.1(N)
  6.  
  7. - [note about version numbering, release schedule]
  8. - NewtPack saves "small" packages on pre-1.3 ROM OMP (RUNewt no longer needed)
  9. - NewtPack better progress feedback, faster, creates smaller packages
  10. - NewtPack saves books, apps (autoClose option), autoparts (dispatch-only option)
  11. - Heap button displays current heap/does gc; Eval Controls draggable off screen
  12. - better coordination of Print&Notify behavior between Eval Log, Slurpee, NTK
  13.   if you use Slurpee, you must use Slurpee 1.6 (earlier versions incompatible)
  14. - uses DontAsk patch with standard keyboard (rather than custom keyboard)
  15. - GetNamedResource works directly with Ben Gottlieb's Icon Editor
  16. - internal cleanup, performance tuning, better heap use, additional preferences
  17. - faster versions of Newt and NewtPack with native code available to registered users.
  18.  
  19.  
  20. -----
  21.  
  22.  
  23. - Version Numbering, Release Schedule
  24.  
  25. To help identify various versions (including beta, internal and native), I
  26. have modified version numbering slightly.  The version number appears as part
  27. of the About Box title in Newt, in the progress box for NewtPack, and the
  28. title of Slurpee and Life. It will also appear in the filenames of the desktop
  29. packages (shortened to "8.3" to make naming consistent across platforms;
  30. app=4, version#=2, beta=1, Native=1 . pkg=3).
  31.  
  32. In addition to the main version number for public release,
  33. e.g., "3.1" or "1.6", other modifiers may appear:
  34.  "a" -- beta version indicated by lowercase letter (a-z)
  35.  "D" -- Debugging info is included [you should not see]
  36.  "P" -- Profiling is included [you should not see]
  37.  "N" -- some Native code is included (usually a smaller, non-native version also avail)
  38.  
  39. (note: individual apps can add configuration info to this; for example,
  40. NewtPack adds "+S" if "small" package saving method is being used)
  41.  
  42. For example, new releases:
  43.   title             filename
  44.   -------------     -----------
  45.   Newt 3.1          Newt31.pkg
  46.   NewtPack 3.1      Pack31.pkg
  47.   NewtPack 3.1N     Pack31N.pkg
  48.   Slurpee 1.6       Slrp16.pkg
  49.   Slurpee 1.6N      Slrp16N.pkg
  50.   Life 1.3N         Life13N.pkg
  51.  
  52. Historically, I have been making public releases of Newt and associated tools
  53. about every three months, unless there is a "show stopper" bug.  Much more
  54. frequently than this, and the overhead of updating all of the doc files,
  55. testing, and uploading to all of the various services and formats becomes too
  56. time-consuming.  As I fix bugs, add features and tune performance, I will
  57. continue to release beta versions via my web/ftp site (I am also looking into
  58. the NEWTVEN area on Compuserve); I can distribute versions via email for
  59. users who have a particular need.  If you download a beta version, please let
  60. me know if it works or doesn't work for you and email me comments; also,
  61. continue to check periodically (every week or two) for newer versions.
  62.  
  63. I will be updating the manual to remove RUNewt stuff, incorporate the
  64. information in this file and Q&A digests, and generally add to system
  65. function and method descriptions (I had waited for NTK 1.5.1 documentation,
  66. but there really wasn't anything new). I also want to check that the PDF I
  67. create is more portable (several users had reported problems with fonts and
  68. such). Due to several upcoming trips, I don't think this will be done until
  69. late-September. In the meanwhile, the 3.0 manual will have to do, along with
  70. this changes file.  I will also go thru the old DTS examples systematically
  71. to modify according to the latest versions.
  72.  
  73.  
  74. ---------
  75.  
  76.  
  77. - NewtPack saves "small" packages on pre-1.3 ROM OMP (RUNewt no longer needed)
  78.  
  79. On an OMP (pre-1.3 ROM Original Message Pad), you can save a package which is
  80. somewhat larger than the remaining heap available after you have built your
  81. app; practical limit for now is probably ~30-40K. For OMP, NewtPack creates
  82. the package as a single object in heap. For other MPs, NewtPack normally uses
  83. a buffered scheme to save 4K segments in a soup, thus allowing arbitrary size
  84. packages; this "small" method may be a little faster (less soup access &
  85. buffer thrashing), so if you'd like to try this on small packages (for OMP
  86. it's automatic/required):
  87.     :setPreference('smallPackage,true)
  88.  
  89. progressBox displays version 3.1+S -- "+S" indicates "small" method in use
  90.  
  91. RUNewt is no longer needed/distributed/supported.
  92.  
  93.  
  94. -----
  95.  
  96.  
  97. - NewtPack better progress feedback, faster, creates smaller packages
  98.  
  99. To give another indication of progress, the progress box shows the most recent
  100. slot saved.  To speed saving, it omits displaying some "system" slots and
  101. does not refresh the gauge quite as often.  (I had tried a version which
  102. would display the entire path for arrays and frames, but these were generally
  103. too long for the screen). When NewtPack finishes saving, it displays
  104. "<Installing>" while the system installs the package. While saving, progress
  105. box does not show a closebox. If an error occurs, a closebox (re)appears.
  106.  
  107. Instead of trying to calculate how large a package might be, Newt/NewtPack
  108. defaults to 40000 for scaling the gauge.  If you have built your package
  109. earlier and know the approximate size, you can put a sizeHint slot in your
  110. _package frame and NewtPack will use this for the gauge's maximum value, e.g.,
  111.   {_package:
  112.      {sizeHint: 35000, 
  113.      ...
  114.      
  115. After doing some profiling and recoding in NTK 1.5, the regular (totally
  116. non-native version of NewtPack) saves somewhat (15-25%?) faster (smarter
  117. sorting of slots in big frames, better handling of frame maps and symbols).
  118.  
  119. In case your app has any circular references in the template structure,
  120. these will now be saved properly (it may be difficult to create these though
  121. in Newt).
  122.  
  123.  
  124. -----
  125.  
  126.  
  127. - NewtPack saves books, apps (auto-close option), autoparts (dispatch-only option)
  128.  
  129. NewtPack can now save book types -- it is still tedious to create books (see
  130. books.nwt), but at least they can be saved as packages. Some internal cleanup
  131. so that NewtPack can be used directly by Newt's Cape (w/o Newt) [coming soon:
  132. "Newt's Cape" -- an easier way to create books & forms]
  133.   
  134. Allows a package to set "autoClose" (default: nil). Normally, an app
  135. automatically closes when another autoClose app opens. If you have a "floating tool",
  136. you may not want this to happen, so
  137.   _package: {autoClose: 'noAutoClose, // do not automatically close
  138.  
  139. Packages now contains two identical dates for create & modify (earlier they
  140. were in different units due to a misunderstanding about format).
  141.  
  142. NewtPack can create "dispatch-only autoparts" -- these run only once when
  143. initially installed; but are not saved so they do not run again after restart
  144. or card insertion). [this has not been tested]
  145.   _package: {dispatchOnly: true, // default for autopart is nil
  146.  
  147. see Mike Engber's bitparts article (ftp.apple.com/dts/newton/articles) for
  148. when this might be useful
  149.  
  150. Fixes a bug that primarily affected building an autopart which already had an
  151. existing package -- running out of heap (Newt tried "fixing" the old package
  152. object which included the "store"). This should hopefully fix some other
  153. problems related to removing packages.
  154.  
  155.  
  156. -----
  157.  
  158.  
  159. - Heap button displays current heap/does gc; Eval Controls draggable off screen
  160.  
  161. Tap button to start updating or to force a gc (garbage collect) note: this
  162. updates only during system idle; it does not update during a build. You can
  163. turn this on automatically and set the frequency via two preferences:
  164.   :setPreference('autoHeap, true) // default=nil
  165.   :setPreference('heapFreq, 5000)  // #msecs. default=15000 (every 15 seconds)
  166.   
  167. If you manually started it, you can stop it by just closing Eval Controls &
  168. re-opening.
  169.  
  170. Eval Controls (like Slurpee) is draggable off right edge of screen. 
  171. Lower left corner is a good place to grab.
  172.  
  173. Select All and Write() experimental commands added to action menu.  Select All
  174. highlights all of the current text field, e.g., source editor, Eval field, or
  175. Eval Log. This could be handy for dragging to another app via clipboard, or
  176. use with Write(). The Write command uses the Write function on contents of
  177. current text field or highlighted range -- typically printing text to Slurpee
  178. or NTK Inspector (I used Write instead of Print since Newt's Print may
  179. quoting inside symbols and strings). Write() could be useful for editing a
  180. single field on the desktop (and then sending it back via Slurpee in Inspect?
  181. mode). These features will probably evolve, along with a more official API
  182. for having other tools talk to Newt and/or Slurpee.
  183.  
  184.  
  185. -----
  186.  
  187.  
  188. - better coordination of Print&Notify behavior between Eval Log, Slurpee, NTK
  189.   if you use Slurpee, you must use Slurpee 1.6 (earlier versions incompatible)
  190.  
  191. Newt saves the global Print and Write functions and global Notify method, and
  192. redefines these when it is open (or asked to by Slurpee).
  193.  
  194. when you Print or Write a value (directly via function or via Eval), result
  195. goes to Eval Log (if Print? is on) result also goes to either Slurpee (if
  196. connected) or to the original Print/Write function (NTK Inspector if
  197. connected) so, you can see result in 0,1 or 2 places.
  198.  
  199. When you generate an error (directly via Notify or via bugs) error goes to
  200. Eval Log (if Newt is open, regardless of Print? setting) error goes to
  201. Slurpee (if connected) if Slurpee not connected (and Newt is closed), error
  202. goes to original Notify (dialog box and/or NTK Inspector); if Newt is open,
  203. error is just printed, e.g., to NTK Inspector. so, you can see errors in 1 or
  204. 2 places. Newt could always invoke the original Notify method, but the Notify
  205. dialog doesn't really add any new information.
  206.  
  207. This should provide somewhat better error behavior if your application
  208. generates an error during development. If you weren't using Slurpee, error
  209. went to a Notify dialog; now it goes to Eval Log.  Newt cannot provide
  210. information from the "exception frame" (e.g., name of undefined variable or
  211. method) since it is not available by the time Notify is invoked. (For those
  212. of you with the NTK Inspector, it "cheats" by dumping some information before
  213. the Notify; unfortunately, it doesn't use Write or Print). Another approach
  214. is to invoke a suspect method directly in Newt's Eval field rather than
  215. through the normal event loop, e.g., myapp.mybutton:buttonClickScript(); this
  216. allows Newt to set up a context to capture the error (with more information)
  217. sooner.
  218.  
  219. Finally, Newt restores the original Print,Write & Notify definitions when it
  220. quits (or if Slurpee disconnects when Newt isn't open).  If for some reason
  221. you want to use the original definitions during development, you can Eval
  222. :setInspector(nil,true) to restore them and bypass much of Newt's print and
  223. error behavior. setInspector now returns a status that can be used, e.g., by
  224. Slurpee, to restore original state for more predictable Print/Notify behavior
  225. when switching between EvalLog, NTK Inspector, Slurpee.
  226.  
  227. inspterm.nwt updated to coordinate Print/Notify changes; included .doc file
  228.  
  229. printRefresh preference can be used to force Print to occur sooner for Eval Log.
  230. currently, when Print? is on, results are not refreshed after each Print, but
  231. at the end, e.g., after a build.  to force a refresh (for Eval Log) after each
  232. Print expression, :setPreference('printRefresh,true) // default is nil
  233.  
  234.  
  235. -----
  236.  
  237.  
  238. - uses DontAsk patch with standard keyboard (rather than custom keyboard)
  239.  
  240. Eliminates Newt's built-in keyboard object (but kept icon). Includes DontAsk
  241. autopart with Newt -- this eliminates "Do you want to add" prompt, and works
  242. better with other utilities like KeyMan and Graffiti.  Since DontAsk
  243. initially starts with standard keyboard behavior (it asks for prompts), you
  244. can set an 'askWords preference in Newt to set this for you next time the
  245. keyboard opens in Newt:    :setPreference('askWords, nil)
  246.  
  247. Note: there is a bug in the standard keyboard (separately from DontAsk). If
  248. you have a prompt visible, and close the keyboard by tapping the kbd icon
  249. rather than the close box, then when the keyboard re-opens, the prompt will
  250. re-appear but overwrite the top row of keys. I have a possible patch for
  251. this, but don't know if it would interfere with patches.
  252.  
  253. -----
  254.  
  255.  
  256. - GetNamedResource works directly with Ben Gottlieb's Icon Editor
  257.  
  258. Slurpee examples create soups (such as Bitmaps) with a Symbol 'name field.
  259. Icon Editor has a 'name field, but it's a String type. GetNamedResource
  260. checks index specifications for type of 'name. Also fixes a bug related to
  261. repeated saving of packages.
  262.   
  263. to get an icon you create with Icon Editor 1.1 (see URL on the releases page)
  264.   :GetNamedResource("Icons:BenG","foo",'icon) // returns 'icon field
  265.  
  266.   :GetPICTasBits("Bitmaps","foo") // returns 'bitmap field
  267.  
  268.  
  269. -----
  270.  
  271.  
  272. - faster versions of Newt and NewtPack with native code available to registered users.
  273.  
  274. A native version of NewtPack (with several RISC methods) [NtPk31N.pkg] is
  275. ~15-20%  faster overall than non-native version, but about double in size.
  276. There are a few methods in Newt that can be made native -- I have to
  277. determine how significant/noticeable this is compared to size tradeoff.  I
  278. will continue to experiment...
  279.  
  280. -----
  281.  
  282.  
  283. - internal cleanup, performance tuning, better heap use, additional preferences
  284.  
  285. fixed bogus "duplicate name" problem.
  286. (undocumented order of union soups may differ from GetStores()).
  287.  
  288. source soup entries accessed via fewer undocumented slots/functions
  289. (generally, more cleanup here needs to be done; perhaps at the Newton
  290. Developer Conference programming labs)
  291.  
  292. folderTab now displays correct folder (sometimes previous name remained) for
  293. some reason, similar (length?) names remained, e.g., test2, test3 (Newt now
  294. does an extra refresh; Notepad still has this bug)
  295.  
  296. When changing folders (or upon startup), Newt displays names of
  297. objects/methods as it's checking.  (Slurpee appears initially ~32 pixels
  298. from the top so that after starting Newt, these names are visible).
  299.  
  300. better heap behavior after quit (removes extraneous Newt view slots)
  301.  
  302. prevent accidental quit via preference 'closeConfirm
  303.   'alwaysConfirm // always ask
  304.   'editedConfirm // only ask if there's an unsaved edit
  305.   nil // don't ask (default)
  306.   e.g., :setPreference('closeConfirm,'editedConfirm)
  307.  
  308. additional customization for Newt itself, e.g., adding buttons to status bar,
  309. or preference picker to Eval Controls. (see new example: newtcust.nwt)
  310.  
  311. scrolling more "standard" (and added support for eventual horizontal scrolling,
  312. though still unclear whether Newton really supports this for text; see QA)
  313.  
  314. user apps and books :open more cleanly (less behind-the-scenes kludgery)
  315.  
  316. evaluation context/inheritance hierarchy modified
  317.   previously:  root <- newt <- constants <- yourapp
  318.   now:         root <- constants <- newt <- yourapp
  319.   this provides the same development-time context to your app.  however, it
  320.   makes app:open() simpler and allows addition of children to Newt
  321.   itself via header syntax (see next).
  322.  
  323. Newt header syntax now allows use of "." and "+" on arbitrary frames. 
  324. Previously, you could only add slots and children to children or prototypes
  325. (whose name began with "proto"); otherwise, you probably saw an error message
  326. about "run_method" not defined. You can now do this for any frame or user
  327. proto (and Newt will splice in an inheritance context during development to
  328. make it work).  So the following will now work:
  329.  
  330.   myApp.foo
  331.   {a: nil,
  332.   b: nil}
  333.   -----
  334.   myApp.foo.bar
  335.   {aa: 1, bb: 2} // this used to break
  336.   -----
  337.   myApp.aproto
  338.   {z: 3}
  339.   -----
  340.   myApp.aproto.somemethod
  341.   func() nil // this used to break
  342.   -----
  343.   myApp.aproto+achild
  344.   {...} // this used to break
  345.  
  346. A corollary to this is that some latent bugs in your application may be
  347. revealed sooner, especially in apps that use protos as non-view classes
  348. (e.g., InspecTerm), since Newt adds "fake" inheritance links only if needed.
  349.  
  350. fixes a few low heap conditions during check & build.
  351. (hypothesis: the compile function doesn't do a gc if needed;
  352. improvement: reduced # of separate source substrings/copies before compile)
  353.  
  354. removePackage can accept a "Newt symbol" (if app is built) in addition to an
  355. appSymbol -- this is the same (more or less) as
  356.     :removePackage(newtView.(sym).appSymbol)
  357.  
  358.     :removePackage('myApp)        // works if app is under development
  359.     :removePackage('|myApp:Newt|) // works anytime (no confirm)
  360.     :removePackage(nil) // select from menu of packages
  361.  
  362. RemovePackage now sorts packages alphabetically in popup
  363.  
  364. To support RemovePackage more efficiently, addApp now remembers if a package
  365. already exists (and uses this in installApp, saveApp, removePackage)
  366.  
  367.  
  368. removed Newt methods/slots:
  369.   :Print -- use Print function
  370.   :Write -- use Write function
  371.   :addProtoDict -- use :DefConst or @literal for non-standard protos
  372.   .protoDict (slot) -- ditto
  373.   :addPackage -- use :addView
  374. (note: there were some warnings in earlier release notes that these might
  375. go away.)
  376.  
  377. installApp reports error if a package already exists. If you do a build to
  378. create an application (in heap), but already have a package with the same
  379. name (appSymbol), then when you do an :installApp(myApp,true), this could
  380. interfere with the currently installed package (changing Extras icon,
  381. redefining  change Extras icon, overwrite global state via installScript,
  382. etc. So, Newt reports that package already exists.  At this point, you can do
  383. removePackage yourself, e.g., :removePackage('myApp)
  384.  
  385. If you do :installApp(myApp,nil) directly [or the system calls it via
  386. :removeApp or when Newt quits] and the package already exists, Newt does not
  387. do the de-install and reports no error.  [This should fix the problem where a
  388. package's icon might disappear from Extras (until you restarted)].
  389.  
  390. I noticed one occasion where Newt's icon disappeared when I ok-ed "Replace
  391. Package?" -- the existing package was removed correctly, but the system
  392. removed Newt from Extras (restarting fixed the problem). I think this is a
  393. Newton system problem -- if anyone can reproduce, please let me know.
  394.  
  395.  
  396. For emergency situations where you've run out of heap while trying to save
  397. source, you should first close any other views you have open (Slurpee,
  398. EvalLog, keyboards, other tools). If that isn't enough, you can Eval
  399. :help_save().   This removes user-defined apps, methods & constants and
  400. uncaches various Newt internal structures -- this could free up several K,
  401. depending on number of sources etc. Hopefully, you can now save; quit (rather
  402. than continuing to work) and then restart Newt (you may wish to reboot your
  403. Newton first to maximize heap). (Eventually, this might also turn off syntax
  404. checking so that a compile isn't necessary before saving source text).
  405.